package com.xjj.myoa.service.Impl;

import com.xjj.myoa.dao.BuMenMapper;
import com.xjj.myoa.model.OaBuMen;
import com.xjj.myoa.service.BuMenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BuMenServiceImpl implements BuMenService {
    @Autowired
    BuMenMapper bumenMapper;
    @Override
    public List<OaBuMen> getBuMenListService() {
        List<OaBuMen> oaBuMenList = bumenMapper.findBuMenList();
        return oaBuMenList;
    }

    @Override
    public Boolean removeBuMenService(int id) {
        boolean result = bumenMapper.deleteBuMenById(id);
        return result;
    }

    @Override
    public Boolean editBuMenService(OaBuMen oaBuMen) {
        boolean result = bumenMapper.updateBuMen(oaBuMen);
        return result;
    }

    @Override
    public Boolean addBuMenService(OaBuMen oaBuMen) {
        boolean result = bumenMapper.addBuMen(oaBuMen);
        return result;
    }

}
